package org.jash.demo2205.entity

import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import com.alibaba.android.arouter.launcher.ARouter
import org.jash.demo2205.utils.bus
@Entity
data class Goods(
    val category_id: Int,
    val goods_attribute: String?,
    val goods_banner: String,
    val goods_code: String,
    val goods_default_icon: String,
    val goods_default_price: Float,
    val goods_desc: String,
    val goods_detail_one: String,
    val goods_detail_two: String,
    val goods_sales_count: Int,
    val goods_stock_count: Int,
    @PrimaryKey
    val id: Int
) {
    @Ignore
    lateinit var bannerList: List<String>

    fun showDetail() {
        ARouter.getInstance()
            .build("/shop/detail")
            .withInt("id", id)
            .navigation()
    }
}